package com.company.test.abstract_factory;

/**
 * @author zhangyan
 * @version $ Id: AbstractFactory.java, v 0.1 2020/9/16 19:49 zhangyan Exp $
 */
public abstract class AbstractFactory {
    abstract Notebook createNotebook();

    static class HuaWeiAbstractFactory extends AbstractFactory {

        @Override
        Notebook createNotebook() {
            return new Notebook.HuaWeiNotebook();
        }
    }

    static class LenovoAbstractFactory extends AbstractFactory {

        @Override
        Notebook createNotebook() {
            return new Notebook.LenovoNotebook();
        }
    }

}
